package com.lagou.sqlSession;

import com.lagou.pojo.Configuration;

/**
 * DefaultSqlSessionFactory类用于生成SqlSession对象
 *
 * @author YiYa
 * @since 2020-11-08 上午 10:18
 */
public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration);
    }
}
